import Vue from 'vue'
import VueI18n from 'vue-i18n'
// elementui的中英文语言包
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
Vue.use(VueI18n)

// 创建国际化插件的实例
const i18n = new VueI18n({
  locale: 'en', // 设置地区，zh 表示中国地区
  // 设置地区信息
  messages: {
    en: {
      navbar: {
        companyName: 'Guangxi Education Technology Co., Ltd'
      },
      sidebar: {
        dashboard: 'Dashboard',
        approvals: 'Approvals',
        departments: 'Departments',
        employees: 'Employees',
        permission: 'Permission',
        attendances: 'Attendances',
        salarys: 'Salarys',
        setting: 'Company-Settings',
        social: 'Social'
      },
      ...enLocale,
      messages: {
        hello: 'hello world'
      }
    },
    zh: {
      navbar: {
        companyName: '广西教育科技股份有限公司'
      },
      sidebar: {
        dashboard: '首页',
        approvals: '审批',
        departments: '组织架构',
        employees: '员工',
        permission: '权限',
        attendances: '考勤',
        salarys: '工资',
        setting: '公司设置',
        social: '社保'
      },
      ...zhLocale,
      messages: {
        hello: '你好'
      }
    }
  }
})

export default i18n
